package com.question.domain;

public class Topic {
	private static final long serialVersionUID = 1L;
	
	private int questionId;
	private String question;
	private String a;
	private String b;
	private String c;
	private String d;
	private String e;
	private String answer;
	private int type;
	public int getQuestionId() {
		return questionId;
	}
	public void setQuestionId(int questionId) {
		this.questionId = questionId;
	}
	public String getQuestion() {
		return question;
	}
	public void setQuestion(String question) {
		this.question = question;
	}
	public String getA() {
		return a;
	}
	public void setA(String a) {
		this.a = a;
	}
	public String getB() {
		return b;
	}
	public void setB(String b) {
		this.b = b;
	}
	public String getC() {
		return c;
	}
	public void setC(String c) {
		this.c = c;
	}
	public String getD() {
		return d;
	}
	public void setD(String d) {
		this.d = d;
	}
	public String getE() {
		return e;
	}
	public void setE(String e) {
		this.e = e;
	}
	public String getAnswer() {
		return answer;
	}
	public void setAnswer(String answer) {
		this.answer = answer;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	@Override
	public String toString() {
		return "Topic [questionId=" + questionId + ", question=" + question
				+ ", a=" + a + ", b=" + b + ", c=" + c + ", d=" + d + ", e="
				+ e + ", answer=" + answer + ", type=" + type + "]";
	}
	
	public String toJSPString() {
		StringBuffer strBuf = new StringBuffer();
		strBuf.append("{"+question+",");
		if(a!=null)
			strBuf.append("A"+a+",");
		if(b!=null)
			strBuf.append("B"+b+",");
		if(c!=null)
			strBuf.append("C"+c+",");
		if(d!=null)
			strBuf.append("D"+d+",");
		if(e!=null)
			strBuf.append("E"+e+"}");
		return strBuf.toString();
	}
	
}
